<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:78:"C:\xampp\htdocs\game\game1\douniu1/application/game\view\douniuplay\index.html";i:1507028966;s:79:"C:\xampp\htdocs\game\game1\douniu1/application/game\view\douniuplaywjy\mp3.html";i:1506846440;s:79:"C:\xampp\htdocs\game\game1\douniu1/application/game\view\douniuplaywjy\img.html";i:1500606572;}*/ ?>
<!DOCTYPE>
<html>

<head>
    <title>牛牛房间<?php echo $room['room_num']; ?>【<?php if($gamerule['gametype'] == '1'): ?>牛牛上庄<?php endif; if($gamerule['gametype'] == '2'): ?>固定庄家<?php endif; if($gamerule['gametype'] == '3'): ?>自由抢庄<?php endif; if($gamerule['gametype'] == '4'): ?>明牌抢庄<?php endif; if($gamerule['gametype'] == '5'): ?>通比牛牛<?php endif; ?>】</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge，chrome=1">
    <meta name="description" content="不超过150个字符" />
    <meta name="keywords" content="">
    <meta name="format-detection" content="telephone=no">
    <meta name="robots" content="index,follow" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp">
    <meta name="HandheldFriendly" content="true">
    <meta name="msapplication-tap-highlight" content="no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="stylesheet" type="text/css" href="__STATIC__/game/css/play.css">
    <link rel="stylesheet" type="text/css" href="__STATIC__/game/css/opentip.css">
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>

    <![endif]-->
</head>

<body>

    <style>
        * {
            -webkit-backface-visibility: hidden;
            opacity: 1;
        }

        body {
            background: url(__STATIC__/game/img/table.jpg) no-repeat;
            background-size: 100% auto;
            background-color: rgb(17, 103, 59);
        }

        .photo {
            display: none;
        }

        .msgshow {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: rgba(0, 0, 0, 0.8);
            color: #fff;
            padding: 5px;
            font-size: 12px;
        }

        .desk .photo {
            text-align: center;
            float: right;
            margin-bottom: 1rem;
        }

        .desk .players2 {
            width: 4.5rem;
            position: absolute;
            top: 1em;
            left: -2.6rem;
        }

        .desk .players1 {
            width: 4.5rem;
            position: absolute;
            top: 1em;
            right: -2.6rem;
        }

        .desk {
            clear: both;
            width: 70%;
            border: none;
            position: absolute;
            top: 2em;
            left: calc(20% - 1.5rem);
            bottom: 0.7em;
            border-radius: 4rem;
            background: none;
            -moz-box-shadow: none;
            -webkit-box-shadow: none;
            box-shadow: none;
        }

        .cards {
            width: 100%;
            margin-left: 0%;
            text-align: center;
            position: absolute;
            bottom: 14px;
            z-index: 100;
        }

        .cardsbox {
            position: relative;
            display: none;
        }

        .cards .poker {
            width: 13%;
            display: inline-block;
            border-radius: .3rem;
            overflow: hidden;
        }

        .cards .pai {
            min-height: 59px;
        }

        .cards.tanpaied .poker {
            position: absolute;
        }

        .cards.tanpaied .box1 {
            left: 90px;
        }

        .cards.tanpaied .box2 {
            left: 110px;
        }

        .cards.tanpaied .box3 {
            left: 130px;
        }

        .cards.tanpaied .box4 {
            left: 180px;
        }

        .cards.tanpaied .box5 {
            left: 200px;
        }

        .cards .poker img {
            width: 100%;
            vertical-align: bottom;
        }

        .cardsbox .poker {
            width: 30px;
            display: inline-block;
            border-radius: .2rem;
            overflow: hidden;
            
        }

        .cardsbox .poker img {
            width: 100%;
            border-left: 1px solid #ebe9e7;
        }

        .cardsbox .box1 {
            position: absolute;
            left: 10px;
            z-index: 1;
        }

        .cardsbox .box2 {
            position: absolute;
            left: 22px;
            z-index: 1;
        }

        .cardsbox .box3 {
            position: absolute;
            left: 34px;
            z-index: 1;
        }

        .cardsbox .box4 {
            position: absolute;
            left: 46px!important;
            z-index: 1;
        }

        .cardsbox .box5 {
            position: absolute;
            left: 58px!important;
            z-index: 1;
        }

        .cardsbox.tanpaied .box4 {
            position: absolute;
            left: 60px!important;
            z-index: 1;
        }

        .cardsbox.tanpaied .box5 {
            position: absolute;
            left: 72px!important;
            z-index: 1;
        }

        .niuname {
            position: absolute;
            display: none;
            z-index: 5;
            left: 9px;
            top: 20px;
            font-size: 14px;
            width: 100%;
            text-align: center;
            color: #f00;
        }

        .niuname.main {
            top: 33px;
        }

        .niuname img {
            width: 80px;
        }

        .last-time {
            display: none;
        }

        .tanpai {
            display: none;
        }

        .cards {
            display: none;
        }

        .photo {
            position: relative;
        }

        .readyimg {
            width: 50px !important;
            height: auto !important;
            position: absolute;
            display: none;
        }

        .xiazhubox {
            position: absolute;
            top: -15px;
            left: 12px;
            width: 80px;
        }

        .xiazhubox.zhuang {
            left: -10px;
            top: -10px;
        }

        .xiazhubox img {
            width: 15px;
            display: none;
        }

        .xiazhubox img.bankerimg {
            width: 30px;
        }

        .zhuangimg {
            width: 20px;
            position: absolute;
            left: 0;
            top: 0;
            display: none;
            z-index: 2;
        }

        .gameret {
            color: #F6C312;
            text-shadow: -2px -2px 1px #734E10;
            font-size: 16px;
            font-weight: bold;
            display: none;
            position: absolute;
            top: -10px;
            left: 15px;
        }

        .round {
            color: #000;
        }

        .tanpai {
            position: static;
            margin-left: 0;
            width: auto !important;
            margin-bottom: 5px;
        }
        /* 弹窗显示排名的样式 */

        .window {
            position: absolute;
            z-index: 10;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            background: #fff;
            display: none;
            background: #140C09;
        }

        .msg-action img {
            width: 1.6rem;
            margin-top: 0.3rem;
            margin-right: 0.1rem;
        }

        .window .content {
            width: 74%;
            margin-left: 13%;
            margin-top: 30%;
            text-align: center;
        }

        .window .times {
            display: inline-block;
            background: #5B5211;
            border-radius: 0.6rem;
            height: 1.2rem;
            line-height: 1.2rem;
            font-size: 0.6rem;
            color: #D6BC71;
            padding: 0 0.3rem;
            border: 1px solid #ccc;
        }

        .window ul {
            width: 90%;
            margin-left: 5%;
            margin-top: 1.2rem;
        }

        .window ul li {
            background: #1C1606;
            color: white;
            list-style: none;
            width: 96%;
            margin-left: 2%;
            margin-top: 2%;
            height: 2.2rem;
            line-height: 2.2rem;
            font-size: 0.8rem;
            opacity: 0.9;
        }

        .window ul li span:first-child {
            float: left;
            margin-left: 2rem;
            max-width: 5rem;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .window ul li span:last-child {
            float: right;
            margin-right: 2rem;
        }

        .window .add {
            color: #F5D203!important;
        }

        .window>img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            z-index: -1;
        }

        .window .win {
            background: url(__STATIC__/game/img/win.png) left top no-repeat;
            background-size: 12%;
        }

        .photo .tx {
            width: 2rem;
            height: 2rem;
            float: left;
            margin-left: 0.8rem;
            margin-top: 0rem;
            border-radius: 0.4rem;
            overflow: hidden;
        }
        /*.msg .photo {
    left: 50%;
    margin-left: -1.8rem;
    margin-top: -1.6rem;
}*/
        /*.msg-action {
    bottom: 0.45rem!important;
    left: 0.5rem;
    float: left;
    position: absolute;
    z-index: 9999;
}*/
        /*.msg-action img {
    width: 1.6rem;
    margin-top: 0.6rem;
    margin-right: 0.6rem;
}*/

        .msg>img {
            float: right;
            margin-top: 3rem;
            margin-right: 1rem;
        }

        .msg {
            clear: both;
            width: 100%;
            position: absolute;
            bottom: 0rem;
            text-align: center;
        }

        .base-bet {
            display: inline-block;
            background: none;
            color: white;
            padding: .1rem 1rem 0.2rem;
            line-height: 1rem;
            border-top-left-radius: 1rem;
            border-top-right-radius: 1rem;
            border-bottom-left-radius: 1rem;
            border-bottom-right-radius: 1rem;
            margin-top: 3.5rem;
            margin-left: 0.5rem;
        }

        .desk .players3 {
            width: 4.5rem;
            position: absolute;
            top: -11%;
            left: 50%;
            margin-left: -2.8rem;
        }

        .photo {
            width: 3.6rem;
            height: 5.625rem;
            background: url(__STATIC__/botunet/images/player.png);
            background-size: 100%;
            float: none;
            position: relative;
        }

        .msg .photo p,
        .desk .photo p {
            background: none;
            min-width: 0rem;
            margin-top: 0.2rem;
            border-radius: 0.2rem;
            line-height: 0.6rem;
            -moz-box-shadow: 0px 0px 2px #333, inset 0px 0px 3px #222;
            /* -webkit-box-shadow: 0px 0px 2px #333, inset 0px 0px 3px #222; */
            box-shadow: none;
            text-align: center;
        }

        .photo .qzbg1 {
            width: 2.875rem;
            height: 4.375rem;
            position: absolute;
            top: 0.5625rem;
            left: 0.375rem;
            transition: All 0.6s;
            -webkit-transition: All 0.6s;
            -moz-transition: All 0.6s;
            -o-transition: All 0.6s;
            z-index: 1;
        }

        .desk {
            clear: both;
            width: 85%;
            position: absolute;
            top: 2rem;
            left: calc(15% - 1.5rem);
            bottom: 2.5rem;
            border-radius: 10rem;
            background;
        }

        .desk .players1 {
            width: 4.5rem;
            position: absolute;
            bottom: 40%;
            right: -1.5rem;
        }

        .qiang img {
            display: inline-block;
            width: 16%;
        }

        .xiazhu img {
            display: inline-block;
            width: 16%;
        }

        .msg ul {
            width: 55%;
            height: 15rem;
            overflow: auto;
            z-index: 99;
        }

        .msg .photo p span:last-child,
        .desk .photo p span:last-child {
            color: #fff;
        }

        .off-line-head {
            -webkit-filter: grayscale(100%);
            -moz-filter: grayscale(100%);
            -ms-filter: grayscale(100%);
            -o-filter: grayscale(100%);
            filter: grayscale(100%);
            filter: gray;
            opacity: 0.50;
            /* 透明度设置*/
        }
    </style>

    <div class="window">
        <iframe src="" frameborder="0" scrolling="no" style="position: fixed; width:100%; top: 0; left: 0; right: 0; bottom: 0;"></iframe>
    </div>

    <!-- 游戏准备按钮 -->
    <img id="gameready" onclick="gameready1(1);" src="__STATIC__/game/img/ready2.png" style="position:absolute;top: 65%; left: 50%; z-index: 3; margin-left:-50px; width: 85px;<?php if($memberinfo['gamestatus'] == '1'): ?>display:none;<?php endif; ?>">

    <div class="overlay"></div>
    <div class="rules" style="display: none;">
        <img src="__STATIC__/game/img/closes.png">

        <div class="cons">
            <h2>游戏规则</h2>
            <ul>
                <p>创建房间,游戏未进行,不消耗房卡</p>
                <li>模式:<span>
                <?php if($gamerule['gametype'] == '1'): ?>牛牛上庄<?php endif; if($gamerule['gametype'] == '2'): ?>固定庄家<?php endif; if($gamerule['gametype'] == '3'): ?>自由抢庄<?php endif; if($gamerule['gametype'] == '4'): ?>明牌抢庄<?php endif; if($gamerule['gametype'] == '5'): ?>通比牛牛<?php endif; ?>
            </span></li>
                <li>底分:<span><?php echo $gamerule['score']; ?>分</span></li>

                <li>规则:<span>
                <?php if($gamerule['rule'] == '1'): ?>
                牛牛x3 牛九x2 牛八x2
                <?php endif; if($gamerule['rule'] == '2'): ?>
                牛牛x4 牛九x3 牛八x2 牛七x2
                <?php endif; ?>
            </span></li>

                <li>牌型:<span>
                <?php if(!(empty($gamerule['types'][1]) || (($gamerule['types'][1] instanceof \think\Collection || $gamerule['types'][1] instanceof \think\Paginator ) && $gamerule['types'][1]->isEmpty()))): ?>
                五花牛(5倍)
                <?php endif; if(!(empty($gamerule['types'][2]) || (($gamerule['types'][2] instanceof \think\Collection || $gamerule['types'][2] instanceof \think\Paginator ) && $gamerule['types'][2]->isEmpty()))): ?>
                炸弹牛(6倍)
                <?php endif; if(!(empty($gamerule['types'][3]) || (($gamerule['types'][3] instanceof \think\Collection || $gamerule['types'][3] instanceof \think\Paginator ) && $gamerule['types'][3]->isEmpty()))): ?>
                五小牛(8倍)
                <?php endif; ?>
            </span></li>
                <li>局数:<span>
<?php if($gamerule['gamenum'] == '12:1'): ?>
                12局x1房卡
<?php endif; if($gamerule['gamenum'] == '24:2'): ?>
                24局x2房卡
<?php endif; ?>
            </span></li>
            </ul>
        </div>
    </div>

    <div class="rules" style="display: none;">
        <img src="__STATIC__/game/img/closes.png">

        <div class="cons">
            <ul>
                <li><span>背景音乐:</span><label><input id="bgCheck" type="checkbox" class=""> 开启</label></li>
                <li><span>游戏音效:</span><label><input id="musicCheck" type="checkbox" class=""> 开启</label></li>
            </ul>
            <div onclick="openAndCloseMusic()" style="width: 5.4rem;height: 1.6rem;margin:.5rem auto;background:#eb9c0b;font-size:.95rem;border-radius:1rem;color:#fff;line-height:1.6rem;text-align:center">确定</div>
        </div>
    </div>

    <div class="invite" style="position: absolute;top: 1rem;width: 100%;z-index: 100000;display: none;">
        <img src="__STATIC__/game/img/arrow.png" style="width: 5rem;float: right;">
        <p style="color: white;margin:7rem auto;width: 16rem;">
            <span style="display: inline-block;width: 1.5rem;height: 1.5rem;border-radius: 50%;background: red;color: white;text-align: center;line-height: 1.5rem;margin-right: 0.3rem;">1</span>请点击右上角
            <img
                src="__STATIC__/game/img/ico1.png" style="width: 1.5rem;vertical-align: middle;margin:0 0.3rem;">按钮<br/><br/>
                <span style="display: inline-block;width: 1.5rem;height: 1.5rem;border-radius: 50%;background: red;color: white;text-align: center;line-height: 1.5rem;margin-right: 0.3rem;">2</span>选择
                <img
                    src="__STATIC__/game/img/ico2.png" style="width: 1.5rem;vertical-align: middle;margin:0 0.3rem;">发送给朋友来要请好友<br/><br/>
                    <span style="color: #E6A43F;">本产品仅供娱乐，禁止用于赌博</span>
        </p>
    </div>

    <div class="container">
        <div class="header">


            <p class="round" style="width:100%;position: static;
    margin: 0;
    line-height: 2.8;
    text-align: center; position: static; margin: 0; text-align: center;"><span id="playcount"><?php echo $room['playcount']; ?></span>/<span><?php echo $room['game_count']; ?></span>&nbsp;局

                <br>
                <span style="font-size: 14px;color: #fff;
    background: rgba(0,0,0,0.6);
    padding: 3px 9px;
    border-radius: 12px;">底注：<span><?php echo $gamerule['score']; ?></span>分</span>

            </p>


        </div>

        <div class="desk">
            <div class="players1">
                <div class="photo" id="player_1">
                    <p style="margin-top: 15px"><span style="max-width: 2.2rem;font-size: 0.6rem;" class="nickname">不一样的烟火不一样的烟火</span></p>
                    <img src="__STATIC__/game/img/33.png" style="width: 2rem;height: 2rem;">
                    <img style="right:66px;bottom:34px;" class="readyimg" src="__STATIC__/game/img/ready1.png" style="width: 2.5rem;height: 2.5rem;">
                    <img class="zhuangimg" src="__STATIC__/game/img/zhuang.png">
                    <p><span class="money">34</span></p>
                    <span class="gameret"></span>
                    <div class="cardsbox" style="bottom:45px; right:100px;">
                        <div class="poker box1"><img class="pic1" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box2"><img class="pic2" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box3"><img class="pic3" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box4"><img class="pic4" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box5"><img class="pic5" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="niuname">未知</div>
                        <div class="xiazhubox"><img class="bankerimg" src="__STATIC__/game/img/qiangzhuang.png"><img src="__STATIC__/game/img/X-1.png"
                                class="multipleimg"> </div>
                    </div>
                    <img class="qzbg1" style="display: none;" src="/static/botunet/images/bull_banker_bg.png">
                </div>
                <div class="photo" id="player_2">
                    <p style="margin-top: 15px"><span style="max-width: 2.2rem;font-size: 0.6rem;" class="nickname">不一样的烟火不一样的烟火</span></p>
                    <img src="__STATIC__/game/img/33.png" style="width: 2rem;height: 2rem;">
                    <img style="right:66px;bottom:34px;" class="readyimg" src="__STATIC__/game/img/ready1.png" style="width: 2.5rem;height: 2.5rem;">
                    <img class="zhuangimg" src="__STATIC__/game/img/zhuang.png">
                    <p><span class="money">34</span></p>
                    <span class="gameret"></span>
                    <div class="cardsbox" style="bottom:45px; right:100px;">
                        <div class="poker box1"><img class="pic1" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box2"><img class="pic3" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box3"><img class="pic4" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box4"><img class="pic5" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box5"><img class="pic5" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="niuname">未知</div>
                        <div class="xiazhubox"><img class="bankerimg" src="__STATIC__/game/img/qiangzhuang.png"><img src="__STATIC__/game/img/X-1.png"
                                class="multipleimg"> </div>
                    </div>
                    <img class="qzbg1" style="display: none;" src="/static/botunet/images/bull_banker_bg.png">
                </div>




                <div class="photo" id="player_5">
                    <p style="margin-top: 15px"><span style="max-width: 2.2rem;font-size: 0.6rem;" class="nickname">不一样的烟火不一样的烟火</span></p>
                    <img src="__STATIC__/game/img/33.png" style="width: 2rem;height: 2rem;">
                    <img style="right:66px;bottom:34px;" class="readyimg" src="__STATIC__/game/img/ready1.png" style="width: 2.5rem;height: 2.5rem;">
                    <img class="zhuangimg" src="__STATIC__/game/img/zhuang.png">
                    <p><span class="money">34</span></p>
                    <span class="gameret"></span>
                    <div class="cardsbox" style="bottom:45px; right:100px;">
                        <div class="poker box1"><img class="pic1" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box2"><img class="pic3" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box3"><img class="pic4" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box4"><img class="pic5" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box5"><img class="pic5" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="niuname">未知</div>
                        <div class="xiazhubox"><img class="bankerimg" src="__STATIC__/game/img/qiangzhuang.png"><img src="__STATIC__/game/img/X-1.png"
                                class="multipleimg"> </div>
                    </div>
                    <img class="qzbg1" style="display: none;" src="/static/botunet/images/bull_banker_bg.png">
                </div>

                <div class="photo" id="player_6">
                    <p style="margin-top: 15px"><span style="max-width: 2.2rem;font-size: 0.6rem;" class="nickname">不一样的烟火不一样的烟火</span></p>
                    <img src="__STATIC__/game/img/33.png" style="width: 2rem;height: 2rem;">
                    <img style="right:66px;bottom:34px;" class="readyimg" src="__STATIC__/game/img/ready1.png" style="width: 2.5rem;height: 2.5rem;">
                    <img class="zhuangimg" src="__STATIC__/game/img/zhuang.png">
                    <p><span class="money">34</span></p>
                    <span class="gameret"></span>
                    <div class="cardsbox" style="bottom:45px; right:100px;">
                        <div class="poker box1"><img class="pic1" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box2"><img class="pic3" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box3"><img class="pic4" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box4"><img class="pic5" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box5"><img class="pic5" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="niuname">未知</div>
                        <div class="xiazhubox"><img class="bankerimg" src="__STATIC__/game/img/qiangzhuang.png"><img src="__STATIC__/game/img/X-1.png"
                                class="multipleimg"> </div>
                    </div>
                    <img class="qzbg1" style="display: none;" src="/static/botunet/images/bull_banker_bg.png">
                </div>


            </div>
            <div class="players2">


                <div class="photo" id="player_0">
                    <p style="margin-top: 15px"><span style="max-width: 2.2rem;font-size: 0.6rem;" class="nickname">不一样的烟火不一样的烟火</span></p>
                    <img src="__STATIC__/game/img/33.png" style="width: 2rem;height: 2rem;">
                    <img style="left:73px;bottom:30px;" class="readyimg" src="__STATIC__/game/img/ready1.png" style="width: 2.5rem;height: 2.5rem;">
                    <img class="zhuangimg" src="__STATIC__/game/img/zhuang.png">
                    <p><span class="money">34</span></p>

                    <span class="gameret"></span>
                    <div class="cardsbox" style="bottom:45px; left:50px;">
                        <div class="poker box1"><img class="pic1" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box2"><img class="pic2" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box3"><img class="pic3" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box4"><img class="pic4" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box5"><img class="pic5" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="niuname">未知</div>
                        <div class="xiazhubox"><img class="bankerimg" src="__STATIC__/game/img/qiangzhuang.png"><img src="__STATIC__/game/img/X-1.png"
                                class="multipleimg"> </div>
                    </div>
                    <img class="qzbg1" style="display: none;" src="/static/botunet/images/bull_banker_bg.png">

                </div>


                <div class="photo" id="player_3">
                    <p style="margin-top: 15px"><span style="max-width: 2.2rem;font-size: 0.6rem;" class="nickname">不一样的烟火不一样的烟火</span></p>
                    <img src="__STATIC__/game/img/33.png" style="width: 2rem;height: 2rem;">
                    <img style="left:73px;bottom:30px;" class="readyimg" src="__STATIC__/game/img/ready1.png" style="width: 2.5rem;height: 2.5rem;">
                    <img class="zhuangimg" src="__STATIC__/game/img/zhuang.png">
                    <p><span class="money">34</span></p>

                    <span class="gameret"></span>
                    <div class="cardsbox" style="bottom:45px; left:50px;">
                        <div class="poker box1"><img class="pic1" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box2"><img class="pic2" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box3"><img class="pic3" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box4"><img class="pic4" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box5"><img class="pic5" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="niuname">未知</div>
                        <div class="xiazhubox"><img class="bankerimg" src="__STATIC__/game/img/qiangzhuang.png"><img src="__STATIC__/game/img/X-1.png"
                                class="multipleimg"> </div>
                    </div>
                    <img class="qzbg1" style="display: none;" src="/static/botunet/images/bull_banker_bg.png">

                </div>
                <div class="photo" id="player_4">
                    <p style="margin-top: 15px"><span style="max-width: 2.2rem;font-size: 0.6rem;" class="nickname">不一样的烟火不一样的烟火</span></p>
                    <img src="__STATIC__/game/img/33.png" style="width: 2rem;height: 2rem;">
                    <img style="left:73px;bottom:30px;" class="readyimg" src="__STATIC__/game/img/ready1.png" style="width: 2.5rem;height: 2.5rem;">
                    <img class="zhuangimg" src="__STATIC__/game/img/zhuang.png">
                    <p><span class="money">34</span></p>
                    <span class="gameret"></span>
                    <div class="cardsbox" style="bottom:45px; left:50px;">
                        <div class="poker box1"><img class="pic1" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box2"><img class="pic2" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box3"><img class="pic3" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box4"><img class="pic4" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box5"><img class="pic5" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="niuname">未知</div>
                        <div class="xiazhubox"><img class="bankerimg" src="__STATIC__/game/img/qiangzhuang.png"><img src="__STATIC__/game/img/X-1.png"
                                class="multipleimg"> </div>
                    </div>
                    <img class="qzbg1" style="display: none;" src="/static/botunet/images/bull_banker_bg.png">
                </div>


                <div class="photo" id="player_7">
                    <p style="margin-top: 15px"><span style="max-width: 2.2rem;font-size: 0.6rem;" class="nickname">不一样的烟火不一样的烟火</span></p>
                    <img src="__STATIC__/game/img/33.png" style="width: 2rem;height: 2rem;">
                    <img style="left:73px;bottom:30px;" class="readyimg" src="__STATIC__/game/img/ready1.png" style="width: 2.5rem;height: 2.5rem;">
                    <img class="zhuangimg" src="__STATIC__/game/img/zhuang.png">
                    <p><span class="money">34</span></p>
                    <span class="gameret"></span>
                    <div class="cardsbox" style="bottom:45px; left:50px;">
                        <div class="poker box1"><img class="pic1" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box2"><img class="pic2" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box3"><img class="pic3" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box4"><img class="pic4" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="poker box5"><img class="pic5" src="__STATIC__/game/img/pai2/0.png"></div>
                        <div class="niuname">未知</div>
                        <div class="xiazhubox"><img class="bankerimg" src="__STATIC__/game/img/qiangzhuang.png"><img src="__STATIC__/game/img/X-1.png"
                                class="multipleimg"> </div>
                    </div>
                    <img class="qzbg1" style="display: none;" src="/static/botunet/images/bull_banker_bg.png">
                </div>



            </div>

            <p class="last-time"><span class="text" style="margin-top:0; width:100%; font-size: 14px;">等待摊牌</span><span class="int">15</span></p>





            <img style="margin: -25px;
    left: 50%;
    bottom: 120px;" class="readyimg" id="myreadyimg" src="__STATIC__/game/img/ready1.png" style="width: 2.5rem;height: 2.5rem;">


            <div class="cards">
                <p style="color:#fff; margin-bottom: 12px; display: none;">等待玩家家下注</p>
                <p style="color:#fff; margin-bottom: 12px;display: none;">点击牌面看牌</p>
                <img src="__STATIC__/game/img/tanpai.png" onclick="tanpai(); allowPlayMusic && mp3play('mp3xiazhu');" class="tanpai">



                <div class="xiazhu" style="display: none; margin-top:12px;">
                    <img onclick="setmultiple(1);" src="__STATIC__/game/img/one.png">
                    <img onclick="setmultiple(2);" src="__STATIC__/game/img/two.png">
                    <img onclick="setmultiple(4);" src="__STATIC__/game/img/4.png">
                    <img onclick="setmultiple(5);" src="__STATIC__/game/img/five.png">
                </div>
                <div class="qiang" style="display: none; margin-top:12px;">


                    <img onclick="setbanker(1);" src="__STATIC__/game/img/one.png">

                    <img onclick="setbanker(2);" src="__STATIC__/game/img/two.png">
                    <img onclick="setbanker(4);" src="__STATIC__/game/img/4.png">

                    <img onclick="setbanker(0);" src="__STATIC__/game/img/buqiang.png">
                </div>
                <div class="pai">

                    <div class="poker box1" onclick="poker.ajaxshow('<?php echo url('showone'); ?>',0,'__STATIC__/game/img/pai2/',this,function(){ allowPlayMusic && mp3play('mp3fapai');$('.tanpai').prev().hide();});;"><img class="pk" src="__STATIC__/game/img/pai2/0.png"></div>
                    <div class="poker box2" onclick="poker.ajaxshow('<?php echo url('showone'); ?>',1,'__STATIC__/game/img/pai2/',this,function(){ allowPlayMusic && mp3play('mp3fapai');$('.tanpai').prev().hide();});"><img class="pk" src="__STATIC__/game/img/pai2/0.png"></div>
                    <div class="poker box3" onclick="poker.ajaxshow('<?php echo url('showone'); ?>',2,'__STATIC__/game/img/pai2/',this,function(){ allowPlayMusic && mp3play('mp3fapai');$('.tanpai').prev().hide();})"><img class="pk" src="__STATIC__/game/img/pai2/0.png"></div>
                    <div class="poker box4" onclick="poker.ajaxshow('<?php echo url('showone'); ?>',3,'__STATIC__/game/img/pai2/',this,function(){ allowPlayMusic && mp3play('mp3fapai');$('.tanpai').prev().hide();});"><img class="pk" src="__STATIC__/game/img/pai2/0.png"></div>
                    <div class="poker box5" onclick="poker.ajaxshow('<?php echo url('showone'); ?>',4,'__STATIC__/game/img/pai2/',this,function(){ allowPlayMusic && mp3play('mp3fapai');$('.tanpai').prev().hide();});showOneFlag = true;"><img class="pk" src="__STATIC__/game/img/pai2/0.png"></div>
                </div>
                <div class="niuname main">未知</div>
            </div>
        </div>
        <div class="msg" id="player_99" style="bottom: 0;">

            <div class="photo member__<?php echo $memberinfo['id']; ?>" style="display: block;">
                <p style="margin-top: 15px;"><span><?php echo $memberinfo['nickname']; ?></span></p>
                <img src="<?php echo $memberinfo['photo']; ?>" style="width: 2rem;height: 2rem;">
                <img class="zhuangimg" src="__STATIC__/game/img/zhuang.png">
                <p><span class="moneybox"><?php echo $memberinfo['money']; ?></span></p>

                <!-- style="top: -34px;" -->
                <span class="gameret"></span>

                <div class="xiazhubox zhuang"><img class="bankerimg" src="__STATIC__/game/img/qiangzhuang.png"><img src="__STATIC__/game/img/X-1.png" class="multipleimg">                    </div>
                <img class="qzbg1" style="display: none;" src="/static/botunet/images/bull_banker_bg.png">
            </div>


            <div style="clear: both;"></div>

            <div style="left: 0; width: 100%;" class="">
                <img src="__STATIC__/game/img/tb111.png" width="100%" style="position: absolute; left:0; z-index: -1;height: 3.2rem;">
                <img src="__STATIC__/game/img/roomCard.png" style="width: 1.4em; float:left;margin:0.2rem 0 0 1rem;vertical-align: middle;">
                <span
                    style="display: inline-block;padding:0.2rem 0.6rem 0.2rem 0.4rem;background:#564C4A;color: #eee;font-size: 0.7rem;line-height:1rem;border-top-right-radius: 0.9rem;border-bottom-right-radius: 0.9rem;border: 1px solid #666;vertical-align: bottom;margin-bottom: 0.4rem;float:left; margin-top:6px;"><span style="font-size: 0.7rem;" id="roomcards"><?php echo $member['cards']; ?></span>张</span>

                    <div class="msg-action">

                        <img src="__STATIC__/game/img/audiobtn.png" class="audiobtn">

                        <!--  <img onclick="window.location.href='<?php echo url('myhome/index'); ?>'" src="__STATIC__/game/img/home.png" style="margin-right:20px;" class="home">
 -->
                        <img src="__STATIC__/game/img/guize.png" class="rule"> <img class="inviteico" src="__STATIC__/game/img/invite.png"
                            style=""> <img src="__STATIC__/game/img/xiaoxi.png" class="showmsgimg" style="width: 1.6rem;height: 1.6rem;"
                        />
                        <ul style="z-index: 10000;" class="voice">
                            <li onclick="sendmsg('我出去叫人','message1');">我出去叫人</li>
                            <li onclick="sendmsg('你的牌好靓哇','message2');">你的牌好靓哇</li>
                            <li onclick="sendmsg('我当年横扫澳门五条街','message3');">我当年横扫澳门五条街</li>
                            <li onclick="sendmsg('算你牛逼','message4');">算你牛逼</li>
                            <li onclick="sendmsg('不好意思我有事要先走一步啦','message5');">不好意思我有事要先走一步啦</li>
                            <!-- <li onclick="sendmsg('大家好很高兴见到各位','message6');">大家好很高兴见到各位</li> -->
                            <!-- <li onclick="sendmsg('怎么又断线了网络怎么这么差呀','message7');">怎么又断线了网络怎么这么差呀</li> -->
                            <li onclick="sendmsg('别跟我抢庄','message8');">别跟我抢庄</li>
                            <li onclick="sendmsg('别磨蹭快点打牌','message9');">别磨蹭快点打牌</li>
                            <li onclick="sendmsg('群内游戏切勿转发','message10');">群内游戏切勿转发</li>
                            <li onclick="sendmsg('输的裤衩都没了','message11');">输的裤衩都没了</li>
                            <li onclick="sendmsg('玩游戏请先进群','message12');">玩游戏请先进群</li>
                            <li onclick="sendmsg('我给你们送温暖啦','message13');">我给你们送温暖啦</li>
                            <li onclick="sendmsg('谢谢老板','message14');">谢谢老板</li>
                            <!-- <li onclick="sendmsg('不抢','message20');">不抢</li> -->
                            <!-- <li onclick="sendmsg('没牛','message21');">没牛</li> -->
                        </ul>
                    </div>
            </div>
        </div>
    </div>


    <div id="go_out_room_id" style="display:none;"></div>
    <div id="go_out_member_id" style="display:none;"></div>

    <div class="alert" style="width: 80%; display:none;height: 40%;background: #6b4aa5;position: fixed;left: 10%;top: 30%;border: 3px solid #f448fe;border-radius: 20px; z-index:9999999999999999">
        <div class="window-top" style="width: 90%;height: 70%;background: #170e2b;border: 3px solid #ad72c6;border-radius: 20px;margin-left: 5%;margin-top: 5%;">
            <p style="color: #fffaff;font-size: 1rem;width: 90%;margin-left: 5%;margin-top: 18%;text-align: center;">是否踢掉此人？<span></span></p>
        </div>
        <div class="window-bottom" style="width: 86%;font-size: 2.5rem;margin-left: 7%;margin-top: 4%;">
            <div id="create-room" class="button-affirm" onclick="go_out_one()" style="float: left;background: #8a49af;height: 1.5rem;width:45%;color: #ffedff;border: 2px solid #c584e0;border-radius: 10rem;line-height: 1.5rem;text-align: center;">确定</div>
            <div id="join-game" class="button-cancel" onclick="hideView()" style="float: right;background: #f3b220;height: 1.5rem;width:45%;color: #f4faff;border: 2px solid #c584e0;border-radius: 10rem;line-height: 1.5rem;text-align: center;">取消</div>
        </div>
    </div>

    <script src="__STATIC__/game/js/jquery-1.12.1.js"></script>
    <script src="//cdn.bootcss.com/socket.io/1.3.7/socket.io.js"></script>
    <script src="__STATIC__/game/js/lib/opentip.js"></script>
    <script src="__STATIC__/js/countdown.js"></script>
    <script src="__STATIC__/game/js/lib/adapter-jquery.js"></script>

    <script src="__STATIC__/game/js/jquery-ui.min.js"></script>
    <script src="__STATIC__/game/js/jquery.flip.min.js"></script>

    <script src="__STATIC__/js/pokershow.js?v=2.90"></script>
    <script src="__STATIC__/js/gold-fly.js?v=1.6"></script>
    <!--微信分享开始-->

    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" charset="utf-8">

        wx.config(<?php echo $jsconfig; ?>);
        wx.ready(function () {

            var shareData = {
                title: '熟人九人牛牛(房间号：<?php echo $room['room_num']; ?>)',
                desc: '模式：<?php if($gamerule['gametype'] == '1'): ?>牛牛上庄<?php endif; if($gamerule['gametype'] == '2'): ?>固定庄家<?php endif; if($gamerule['gametype'] == '3'): ?>自由抢庄<?php endif; if($gamerule['gametype'] == '4'): ?>明牌抢庄<?php endif; if($gamerule['gametype'] == '5'): ?>通比牛牛<?php endif; ?> 底分：<?php echo $gamerule['score']; ?>分 规则:<?php if($gamerule['rule'] == '1'): ?>牛牛x3 牛九x2 牛八x2<?php endif; if($gamerule['rule'] == '2'): ?>牛牛x4 牛九x3 牛八x2 牛七x2<?php endif; ?>',
                link: '',
                imgUrl: 'http://testgame.nijiujishu.com/static/game/img/niujiu.png',
                success: function () {
                    //分享成功
                }
            };
            wx.onMenuShareAppMessage(shareData);
            wx.onMenuShareTimeline(shareData);
        });
    </script>

    <!--微信分享结束-->

    <script type="text/javascript">

        var bankerId = ''; // 庄家ID
        var forCount = 0; // 选庄动画次数
        var isbanker = 0; // 是否是庄家
        var isSetMultiple = false;
        var showOneFlag = false;
        var isOver = false;
        var allowPlayMusic = true;
        var multiple = 0; // 倍数

        // 打开或关闭背景音乐与音效
        function openAndCloseMusic() {
            if ($('#bgCheck').is(':checked')) {
                mp3play('background');
                localStorage.setItem('allowPlayBG', true);
            } else {
                mp3playandpause('background');
                localStorage.setItem('allowPlayBG', false);
            }
            if ($('#musicCheck').is(':checked')) {
                allowPlayMusic = true;
            } else {
                allowPlayMusic = false;
            }
            localStorage.setItem('allowPlayMusic', allowPlayMusic);
            $(".rules:eq(1)").add(".overlay").hide();
        }

        function tanpaicountdown1(initcount) {
            $('.qiang').hide();
            if (initcount == 0) {
                $('.last-time').hide();
                return false;
            }

            $('.last-time span.text').html('闲家下注');
            $('.last-time span.int').countdown({
                initcount: initcount,
                end: function () {
                    $('.last-time').hide();

                    setmultiple(1);
                }
            });
            setTimeout(function () {
                $('.last-time').show();
            }, 6000)

        }

        function tanpaicountdown(initcount) {
            $('.qiang').hide();
            if (initcount == 0) {
                $('.last-time').hide();
                return false;
            }
            $('.last-time span.text').html('等待摊牌');
            $('.last-time span.int').countdown({
                initcount: initcount,
                end: function () {
                    $('.last-time').hide();
                    tanpai();
                }
            });
            $('.last-time').show();
        }

        function fapaicountdown(initcount) {
            if (initcount == 0) {
                $('.last-time').hide();
                return false;
            }
            $('.last-time span.text').html('准备开始');
            $('.last-time span.int').countdown({
                initcount: initcount,
                end: function () {
                    $('.last-time').hide();
                    gamestart();
                }
            });
            $('.last-time').show();
        }

        function setbankercountdown(initcount) {
            $('.qiang').show();
            if (initcount == 0) {
                $('.last-time').hide();
                return false;
            }
            $('.last-time span.text').html('抢庄');
            $('.last-time span.int').countdown({
                initcount: initcount,
                end: function () {
                    $('.last-time').hide();
                    setbanker(0);
                }
            });

            $('.last-time').show();
        }

        $(function () {
            // 语音消失
            $('.desk').click(function(){
                $('.voice').hide();
            })

            // 从本地缓存中获取是否播放音乐选项
            if (localStorage.getItem('allowPlayBG') != 'false') {
                $('#bgCheck').attr('checked', true);
                mp3play('background');
            } else {
                $('#bgCheck').attr('checked', false);
                mp3playandpause('background');
            }
            if (localStorage.getItem('allowPlayMusic') != 'false') {
                allowPlayMusic = true;
                $('#musicCheck').attr('checked', true);
            } else {
                allowPlayMusic = false;
                $('#musicCheck').attr('checked', false);
            }

            $(".msg img.showmsgimg").click(function () {
                $(".msg ul").toggle();
            })
            $(".rule").click(function () {
                $(".rules:eq(0)").add(".overlay").show();
            })
            $(".rules:eq(0)>img").click(function () {
                $(".rules:eq(0)").add(".overlay").hide();
            })


            $(".audiobtn").click(function () {
                $(".rules:eq(1)").add(".overlay").show();
            })
            $(".rules:eq(1)>img").click(function () {
                if (localStorage.getItem('allowPlayBG') != 'false') {
                    $('#bgCheck').attr('checked', true);
                } else {
                    $('#bgCheck').attr('checked', false);
                }
                allowPlayMusic ? $('#musicCheck').attr('checked', true) : $('#musicCheck').attr('checked', false);
                $(".rules:eq(1)").add(".overlay").hide();
            })

            $(".inviteico").click(function () {
                $(".overlay").addClass("overlay1");
                $(".invite").add(".overlay1").show();
                $(".overlay1,.invite").click(function () {
                    $(".invite,.overlay1").hide();
                    $(".overlay").removeClass("overlay1");
                })
            })

        })

        function strToJson(str) {

            var json = eval('(' + str + ')');
            return json;
        }
        $(document).ready(function () {

            // 连接服务端
            var socket = io('http://' + document.domain + ':2120');
            // 连接后登录
            socket.on('connect', function () {
                $.post('<?php echo url('comein', array('room_id' => input('room_id'))); ?>', {},
                    function (ret) {
                        socket.emit('login', <?php echo $memberinfo['id']; ?>);
                    }, 'json'
                );

            });

            socket.on('update_online_count', function (userlist) {
                //有人加入时更新界面，服务器发来所有用户数据

                $.post('<?php echo url('allmember'); ?>', {
                        userlist: userlist
                    },
                    function (ret) {

                    }, 'json'
                );
            });
            socket.on('update_offline', function (userid) {
                //有人退出\断线时
                $.post('<?php echo url('comeout'); ?>', {
                        memberid: userid
                    },
                    function (ret) {
                        //$('.member__'+userid).hide();
                    }, 'json'
                );

            });

            // 后端推送来消息时
            socket.on('new_msg', function (msg) {
                if (forCount > 0) {
                    $(".qzbg1").hide();
                }
                var ret = strToJson(msg);
                if (ret.room && ret.room.gamestatus <= 1) {
                    $('.zhuangimg').hide();
                }
                if (ret.room && ret.room.gamestatus < 4) {
                    showOneFlag = false;
                }
                var current_member_id = <?php echo $member_id; ?>;
                var room_creat_id = <?php echo $room['member_id']; ?>;
                //msg.type 1是接收用户发送的信息
                if (ret.type == 1) {
                    msgshow(ret.info, ret.from, ret.msgid);
                }
                if (ret.type == 999) {
                    // console.log(ret.data);
                    if (ret.end == 1) {
                        $('#gameready').remove();
                    }
                    $('.zhuangimg').hide();
                    isOver = true;
                    $.jinbiflyall(
                        '<img style="border-radius: 20px;" width="15" src=\'__STATIC__/game/img/jinbi.png\'>',
                        '.member__', ret.data,
                        function () {
                            $('.cardsbox').hide();
                            $('.zhuangimg').hide();
                            $('.pai .poker img').css('opacity', 0);
                            $('.poker').css({
                                'background-color': 'rgba(0,0,0,0)'
                            });
                            $('.niuname').hide();
                            //移除准备按钮，不能再开始游戏了

                            if (ret.end == 1) {
                                setTimeout(function () {

                                    $('.window iframe').attr('src', window.location.href);
                                    $('.window').show();
                                    $('.window iframe').height($(window).height());

                                    //window.location.reload();
                                }, 2000);
                            }

                        },
                        function () {
                            allowPlayMusic && mp3play('mp3gold');
                        })
                }

                //传来房间中其它会员的信息，得到后加入到界面中显示出来，数据是一个json数组
                if (ret.type == 4) {

                    $('#playcount').html(ret.room['playcount']);
                    //更新房卡
                    //$('#roomcards').html(ret.room['room_cards_num']);

                    $('.moneybox').text(ret.money);
                    if (ret.isbanker == 1) {
                        if (ret.issetbanker == 1) {
                            bankerId = '.member__<?php echo $memberinfo['id']; ?>';
                            multiple = ret.multiple;
                            if (ret.room.rule.gametype != 5 && forCount > 0 && !isOver) {
                                // console.log(1, '=======', '.member__<?php echo $memberinfo['id']; ?>')
                                $('.member__<?php echo $memberinfo['id']; ?>').find('.zhuangimg').show();
                            }
                            if (ret.room.rule.gametype != 1 && ret.room.rule.gametype != 5 && ret.room.rule
                                .gametype != 2) {
                                $('.member__<?php echo $memberinfo['id']; ?>').find('.bankerimg').show();
                                // $('.member__<?php echo $memberinfo['id']; ?>').find('.multipleimg').attr('src', '__STATIC__/game/img/X-' + ret.multiple + '.png').show();
                            }


                        }
                    } else {
                        $('.member__<?php echo $memberinfo['id']; ?>').find('.bankerimg').hide();
                        // $('.member__<?php echo $memberinfo['id']; ?>').find('.zhuangimg').hide();
                        if (ret.issetmultiple == 1) {
                            if (ret.room.rule.gametype != 5) {
                                $('.member__<?php echo $memberinfo['id']; ?>').find('.multipleimg').attr('src',
                                    '__STATIC__/game/img/X-' + ret.multiple + '.png').show();
                            }
                        } else {
                            $('.member__<?php echo $memberinfo['id']; ?>').find('.multipleimg').hide();
                        }
                    }

                    //准备发牌
                    if (ret.room.gamestatus == 1) {
                        $('.xiazhubox img').hide();
                        $('input.bankerconfirm').remove();
                        $('.cards .poker').removeClass('tanpaipx');
                        fapaicountdown(ret.room.starttime);
                    }

                    if (ret.gamestatus == 1) {
                        $('#myreadyimg').show();
                        $('#gameready').hide();
                    }
                    if (ret.room.gamestatus == 0) {
                        if (ret.gamestatus == 0) {
                            $('#gameready').show();
                        }
                        poker.init('.poker');
                        $('.tanpai').hide();
                        $('.xiazhu').hide();
                        $('.xiazhubox img').hide();
                        // $('.zhuangimg').hide();
                        $(".qzbg1").hide();
                        $('#cardsshowplay').remove();
                        $('.tanpaishowplay').remove();
                        // $(".qzbg1").css("transform","scale(1)");

                    }
                    //开始抢庄
                    if (ret.room.gamestatus >= 2 && ret.gamestatus > 0) {
                        //刚准备好，发牌完毕
                        $('.cards').show();
                        $('.readyimg').hide();
                        $('#gameready').hide();
                        poker.fanpaiall($('.cards .poker'), '__STATIC__/game/img/pai2/', ret.pai,
                            function () {
                                allowPlayMusic && ('mp3fapai');
                            });


                        //点击过了，不再显示
                        // return;
                        setbankercountdown(ret.room.qiangtime);
                        if (ret.issetbanker == 1) {
                            $('.qiang').hide();
                        }


                        if (ret.room.gamestatus >= 3) {
                            var showall = true;
                            for (var k = 0; k < ret.pai.length; k++) {
                                if (ret.pai[k] == 0) {
                                    showall = false;
                                }
                            }
                            if (!showall) {
                                $('.tanpai').hide();
                                //已经下注才显示这行字
                                if ((ret.issetmultiple == 1 || ret.banker == 1) && !showOneFlag) {
                                    $('.tanpai').prev().show();
                                }

                                if (ret.isbanker == 1 && ret.room.rule.gametype != 5) {
                                    if (ret.room.gamestatus == 3 && forCount >= ret.banker.length - 1) {
                                        $('.tanpai').prev().prev().show();
                                    }
                                }
                            } else {
                                if (ret.gamestatus != 2) {
                                    $('.tanpai').prev().hide();

                                    $('.tanpai').show();
                                }
                                $('.tanpai').prev().prev().hide();
                            }
                        }


                    }


                    if (ret.room.gamestatus == 3) {


                        if (ret.issetmultiple == 0) {
                            //$('.tanpai').hide();
                        }

                        //抢庄动画
                        if ($('input.bankerconfirm').length == 0 && forCount == 0) {
                            for (var b = 0; b < ret.banker.length; b++) {
                                setflash($('.member__' + ret.banker[b]).find('img:eq(0)'), ret.banker.length);

                            }
                            $('<input type="hidden" class="bankerconfirm">').appendTo('body');
                        }

                        if (ret.issetmultiple == 0) {
                            if (ret.isbanker == 0 && ret.gamestatus > 0) {
                                //$('.tanpai').hide();
                                var num = ret.banker.length * 950 + 500;
                                setTimeout(function () {
                                    $('.xiazhu').show();
                                    // console.log('show3');
                                }, num)

                            }

                        } else {
                            $('.xiazhu').hide();
                        }


                        if (ret.gamestatus == 2) {
                            //$('.tanpai').hide();
                            $('.cards .niuname').html('<img width="120" src="__STATIC__/game/img/niu' +
                                ret.info + '.png" >').show();
                        } else {
                            var sc = new Object();
                            sc.t = 0;
                            var b = ret.banker.length * 3;
                            var timer1 = setInterval(function () {
                                if (!b && b != 0) {
                                    clearInterval(timer1);
                                    return;
                                }
                                // console.log(b);
                                forCount++;
                                if (b > 0) {
                                    dom = $('.member__' + ret.banker[b % ret.banker.length]);
                                    $(".qzbg1").hide();
                                    $(dom).find(".qzbg1").show();

                                }
                                if (b <= 1) {
                                    clearInterval(timer1);
                                    setTimeout(function () {
                                        $(".qzbg1").hide();
                                        // 抢庄动画结束，显示庄家img
                                        bankerId = bankerId ||
                                            '.member__<?php echo $memberinfo['id']; ?>';
                                        multiple = ret.multiple;
                                        $(bankerId).find('.qzbg1').show();
                                        $(bankerId).find('img').eq(0).css({
                                            "boxShadow": "0 0px 20px orange",
                                            "transition": "boxShadow 3s ease-in-out"
                                        });
                                        setTimeout(function () {
                                            $(bankerId).find('img').eq(0).css({
                                                "boxShadow": "none",
                                                "transition": "boxShadow 3s ease-in-out"
                                            })
                                            // console.log(2, '=======', bankerId)
                                            $(bankerId).find('.zhuangimg').show();
                                            $(bankerId).find('.multipleimg').attr('src', '__STATIC__/game/img/X-' + ret.multiple + '.png').show();
                                            $(".qzbg1").hide();
                                        }, 800);
                                        if (ret.isbanker == 0) {
                                            if (!isSetMultiple) {
                                                $('.xiazhu').show();
                                                // console.log('show2');
                                            }
                                        } else {
                                            $('.tanpai').prev().prev().show();
                                        }
                                    }, (ret.banker.length - 1) * 950);
                                }

                                if ($(dom).attr("class").indexOf(<?php echo $memberinfo['id']; ?>) > -1 && b < ret.banker.length) {
                                    clearInterval(timer1);
                                    sc.t = ret.banker.length * 3 - b;


                                    dhTime = sc.t * 300;
                                    var dhSize = 1;
                                    timer2 = setInterval(function () {
                                        if (dhTime < sc.t * 300 + 500) {
                                            // $(dom).find(".qzbg1").css("transform","scale("+dhSize+")");
                                            dhTime += 50;
                                            dhSize += 0.1;
                                        };
                                    }, 50);
                                    setTimeout(function () {
                                        $(".qzbg1").hide();
                                        // $(dom).find(".qzbg1").css("transform","scale(1)");
                                        $(dom).find(".qzbg1").show();
                                        clearInterval(timer2);
                                    }, 100);
                                }
                                b--;
                            }, 300);
                            if (ret.issetmultiple == 0) {
                                isbanker = ret.isbanker;
                                if (ret.isbanker == 0 && ret.gamestatus > 0) {
                                    //$('.tanpai').hide();
                                    // $('.xiazhu').show();
                                }

                            } else {
                                $('.xiazhu').hide();
                            }
                        }
                        tanpaicountdown1(ret.room.xiazhutime);
                    }
                    if (ret.gamestatus == 2) {
                        //$('.tanpai').hide();
                        if ($('#cardsshowplay').length == 0) {
                            var cardsshowplay = $('<input type="hidden" id="cardsshowplay">');
                            allowPlayMusic && ('mp3niu' + ret.info);
                            cardsshowplay.appendTo('body');
                        }
                    }
                    //闲家下注，摊牌倒计时
                    if (ret.room.gamestatus == 4) {
                        $('.tanpai').prev().prev().hide();
                        if (!showOneFlag) {
                            $('.tanpai').prev().show();
                        }
                        tanpaicountdown(ret.room.taipaitime);
                        if (ret.gamestatus == 2) {


                            $('.cards .niuname').html('<img width="120" src="__STATIC__/game/img/niu' +
                                ret.info + '.png" >').show();
                        } else {
                            // $('.tanpai').show();
                            if (ret.issetmultiple == 0) {

                                isbanker = ret.isbanker;
                                if (ret.isbanker == 0) {
                                    //$('.tanpai').hide();
                                    // $('.xiazhu').show();
                                }
                            } else {
                                $('.xiazhu').hide();
                            }
                        }
                    }

                    for (var i = 0; i < ret.data.length; i++) {

                        $('#player_' + i).find('img').eq(0).attr('src', ret.data[i].photo);
                        $('#player_' + i).find('.nickname').html(ret.data[i].nickname);
                        $('#player_' + i).find('.money').html(ret.data[i].money);
                        $('.member__' + ret.data[i].id).removeClass('member__' + ret.data[i].id);
                        $('#player_' + i).addClass('member__' + ret.data[i].id);

                        if (current_member_id == room_creat_id) {
                            $('.member__' + ret.data[i].id).find('img').eq(0).attr('onclick',
                                "showHeadImg(" + ret.data[i].room_id + "," + ret.data[i].id + ")");
                        }

                        $('#player_' + i).show();
                        if (ret.data[i].gamestatus == 1) {
                            $('#player_' + i).find('.box4').css("left", "30px"); //恢复原有格式
                            $('#player_' + i).find('.box5').css("left", "40px"); //恢复原有格式
                            $('.member__' + ret.data[i].id + ' .readyimg').show();
                            //把
                        }
                        //显示抢庄倍数

                        if (ret.data[i].issetbanker == 1 && ret.room.gamestatus >= 2) {
                            if (!(ret.room.rule.gametype == 1 || ret.room.rule.gametype == 5)) {

                                $('.member__' + ret.data[i].id).find('.bankerimg').show();
                                $('.member__' + ret.data[i].id).find('.multipleimg').attr('src',
                                    '__STATIC__/game/img/X-' + ret.data[i].multiple + '.png').show();

                            }
                        }

                        if (ret.data[i].online_room == 1) {
                            $('.member__' + ret.data[i].id).removeClass('off-line-head');
                        } else {
                            $('.member__' + ret.data[i].id).addClass('off-line-head');
                        }


                        if (ret.room.gamestatus >= 3) {
                            $('.bankerimg').hide();
                            if (ret.data[i].banker == 1) {
                                bankerId = '.member__' + ret.data[i].id;
                                multiple = ret.multiple;
                            }
                            if (ret.data[i].banker == 1 && ret.room.rule.gametype != 5 && forCount > 0) {

                                // console.log(3, '=======', '.member__' + ret.data[i].id)
                                $('.member__' + ret.data[i].id).find('.zhuangimg').show();

                            } else {

                                if (ret.room.rule.gametype != 5) {
                                    //console.log(ret.data[i].issetmultiple);
                                    if (ret.data[i].issetmultiple == 1) {
                                        $('.member__' + ret.data[i].id).find('.multipleimg').attr('src',
                                            '__STATIC__/game/img/X-' + ret.data[i].multiple +
                                            '.png').show();
                                    } else {
                                        $('.member__' + ret.data[i].id).find('.multipleimg').hide();
                                    }
                                }

                            }
                        }
                        if (ret.room.rule.gametype == 2 && ret.data[i].banker == 1) {
                            $('.member__' + ret.data[i].id).find('.multipleimg').hide();

                        }
                        if (ret.data[i].gamestatus == 0) {
                            $('.member__' + ret.data[i].id).find('.multipleimg').hide();

                        }

                        if (ret.room.gamestatus == 0) {
                            //当前会员未准备状态，重置游戏界面，把准备按钮显示出来，合理的这里其实是一个再来一局的按钮，没关系
                            if (ret.gamestatus == 0) {
                                $('#gameready').show();
                                clearInterval(timer1);
                                $(".photo").css("background", "");
                                $(".qzbg1").hide();
                                // $(".qzbg1").css("transform","scale(1)");
                            }

                            continue;
                        }

                        if (ret.data[i]['gamestatus'] > 0 && ret.room.gamestatus > 1) {

                            $('.member__' + ret.data[i].id + ' .readyimg').hide();
                            if (ret.data[i]['gamestatus'] == 2) {
                                if ($('.member__' + ret.data[i].id + ' .tanpaishowplay').length == 0) {
                                    var tanpaishowplay = $('<input type="hidden" class="tanpaishowplay">');
                                    if (ret.data[i]['info'] > 0) {
                                        $('#player_' + i).find('.cardsbox').addClass('tanpaied');
                                    }
                                    allowPlayMusic && mp3play('mp3niu' + ret.data[i]['info']);
                                    tanpaishowplay.appendTo('.member__' + ret.data[i].id);
                                }


                                $('#player_' + i).find('.cardsbox .niuname').html(
                                    '<img width="120" src="__STATIC__/game/img/niu' + ret.data[i][
                                        'info'
                                    ] + '.png" >');
                                $('#player_' + i).find('.cardsbox .niuname').show();
                                if (ret.data[i]['info'] != 0) {
                                    $('#player_' + i).find('.box4').css("left", "50px");
                                    $('#player_' + i).find('.box5').css("left", "60px");
                                }
                            }
                            $('#player_' + i).find('.cardsbox').show();


                            poker.fanpaiall($('#player_' + i + ' .poker'), '__STATIC__/game/img/pai2/',
                                ret.data[i]['pai'],
                                function () {
                                    allowPlayMusic && mp3play('mp3fapai');
                                });
                        }
                    }
                }
                //踢人 功能
                if (ret.type == 5) {

                    for (var i = 0; i < ret.data.length; i++) {

                        //不是自己被踢
                        if ((ret.data[i].goout_room !== 0) && (current_member_id !== ret.data[i].id)) {
                            $('.member__' + ret.data[i].id).hide();
                            continue;
                        }

                        //被踢的人
                        if ((current_member_id === ret.data[i].id)) {
                            $(window).attr('location', '/game.php/Index/index.html');
                        }
                    }
                }
            });

        });

        function msgshow(msg, memberid, msgid) {
            var playerid = $('.member__' + memberid).attr('id');
            var myInput = $('.member__' + memberid);
            var config = {};

            // console.log('play', msgid);
            allowPlayMusic && mp3play(msgid);

            switch (playerid) {
                case 'player_0':
                    config = {
                        target: true,
                        hideDelay: 0.2,
                        tipJoint: "center top",
                        removeElementsOnHide: true
                    };
                    break;
                case 'player_1':
                    config = {
                        target: true,
                        hideDelay: 0.2,
                        tipJoint: "right",
                        removeElementsOnHide: true
                    };
                    break;
                case 'player_2':
                    config = {
                        target: true,
                        hideDelay: 0.2,
                        tipJoint: "right",
                        removeElementsOnHide: true
                    };
                    break;
                case 'player_3':
                    config = {
                        target: true,
                        hideDelay: 0.2,
                        tipJoint: "left",
                        removeElementsOnHide: true
                    };
                    break;
                case 'player_4':
                    config = {
                        target: true,
                        hideDelay: 0.2,
                        tipJoint: "left",
                        removeElementsOnHide: true
                    };
                    break;
            }
            var inputOpentip = new Opentip(myInput, config);
            inputOpentip.show();
            inputOpentip.setContent(msg);
            setTimeout(function () {
                inputOpentip.hide();
            }, 1500);
        }

        function sendmsg(msg, id){
            // console.log('play', id);
            allowPlayMusic && mp3play(id);
            var inputOpentip1 = new Opentip($('.member__<?php echo $memberinfo['id']; ?>'), {
                target: true,
                hideDelay: 0.2,
                tipJoint: "left bottom",
                removeElementsOnHide: true
            });
            inputOpentip1.show();
            inputOpentip1.setContent(msg);
            setTimeout(function () {
                inputOpentip1.hide();
            }, 1500);

            $('.msg ul').hide();
            $.post('<?php echo url('sendmsg'); ?>', {
                    data: msg,
                    id: id
                },
                function (ret) {

                }, 'json'
            );
        }

        function gameready1(gameready) {
            forCount = 0;
            isSetMultiple = false;
            bankerId = 0;
            isOver = false;
            showOneFlag = false;
            // console.log(showOneFlag);
            $('.niuname').hide();
            $('.cards').hide();
            $('.tanpai').hide();
            $('.cardsbox').hide();
            $('.cardsbox').removeClass('tanpaied');
            $('.cards').removeClass('tanpaied');
            $.post('<?php echo url('gameready'); ?>', {
                    gameready: gameready
                },
                function (ret) {
                    $('#gameready').hide();
                }, 'json'
            );
        }


        function gamestart() {
            forCount = 0;
            isSetMultiple = false;
            bankerId = 0;
            isOver = false;
            showOneFlag = false;
            $('.niuname').hide();
            $('.cards').hide();
            $('.tanpai').hide();
            $('.cardsbox').hide();
            $('.cardsbox').removeClass('tanpaied');
            $('.cards').removeClass('tanpaied');
            $.post('<?php echo url('gamestart'); ?>', {},
                function (ret) {

                }, 'json'
            );
        }

        //抢庄
        function setbanker(multiple) {
            $('.last-time span.int').countdown(0);
            $('.qiang').hide();
            allowPlayMusic && mp3play('mp3xiazhu');
            $.post('<?php echo url('setbanker'); ?>', {
                    multiple: multiple
                },
                function (ret) {
                    // console.log(ret);
                    // $('.last-time').hide();
                }, 'json'
            );

            var memssage_banker = new Array();

            memssage_banker[0] = "不抢";
            memssage_banker[1] = "抢庄×1";
            memssage_banker[2] = "抢庄×2";
            memssage_banker[3] = "抢庄×3";
            memssage_banker[4] = "抢庄×4";

            var memssage_id = new Array();

            memssage_id[0] = "nobanker";
            memssage_id[1] = "robbanker";
            memssage_id[2] = "robbanker";
            memssage_id[3] = "robbanker";
            memssage_id[4] = "robbanker";


            sendmsg(memssage_banker[multiple], memssage_id[multiple]);

        }

        //闲家下注
        function setmultiple(multiple) {
            isSetMultiple = true;
            $('.last-time span.int').countdown(0);
            $('.xiazhu').hide();
            allowPlayMusic && mp3play('mp3xiazhu');
            //$('.tanpai').show();
            $.post('<?php echo url('setmultiple'); ?>', {
                    multiple: multiple
                },
                function (ret) {

                    //$('.last-time').hide();
                }, 'json'
            );
            var memssage_banker = new Array();

            memssage_banker[1] = "1倍";
            memssage_banker[2] = "2倍";
            memssage_banker[4] = "4倍";
            memssage_banker[5] = "5倍";

            var memssage_id = new Array();

            memssage_id[0] = "nobanker";
            memssage_id[1] = "times1";
            memssage_id[2] = "times2";
            memssage_id[4] = "times4";
            memssage_id[5] = "times5";

            sendmsg(memssage_banker[multiple], memssage_id[multiple]);
        }

        //摊牌
        function tanpai() {
            $('.last-time span.int').countdown(0);
            $('.cards .poker').addClass('tanpaipx');

            $.post('<?php echo url('showall'); ?>', {},
                function (ret) {
                    $('.tanpai').hide();
                    $('.tanpai').prev().hide();
                    //$('.last-time').hide();
                }, 'json'
            );
        }

        function setflash(img, length) {
            $(img).css({
                "boxShadow": "0 0px 20px orange",
                "transition": "boxShadow 3s ease-in-out"
            });
            setTimeout(function () {
                $(img).css({
                    "boxShadow": "none",
                    "transition": "boxShadow 3s ease-in-out"
                })
            }, 600);
            setTimeout(function () {
                $(img).css({
                    "boxShadow": "0 0px 20px orange",
                    "transition": "boxShadow 3s ease-in-out"
                });
                setTimeout(function () {
                    $(img).css({
                        "boxShadow": "none",
                        "transition": "boxShadow 3s ease-in-out"
                    })
                }, 600);
                forCount++;

                bankerId = bankerId || '.member__<?php echo $memberinfo['id']; ?>';
                if (forCount >= length - 1) {
                    setTimeout(function () {
                        $(".qzbg1").hide();
                        // 抢庄动画结束，显示庄家img
                        $(bankerId).find('.qzbg1').show();
                        $(bankerId).find('img').eq(0).css({
                            "boxShadow": "0 0px 20px orange",
                            "transition": "boxShadow 3s ease-in-out"
                        });
                        setTimeout(function () {
                            $(bankerId).find('img').eq(0).css({
                                "boxShadow": "none",
                                "transition": "boxShadow 3s ease-in-out"
                            })
                            // console.log(4, '=======', bankerId)
                            $(bankerId).find('.zhuangimg').show();
                            $(bankerId).find('.multipleimg').attr('src', '__STATIC__/game/img/X-' + multiple + '.png').show();
                            $(".qzbg1").hide();
                        }, 800);
                        if (isbanker == 0) {
                            if (!isSetMultiple) {
                                $('.xiazhu').show();
                            }
                        } else {
                            $('.tanpai').prev().prev().show();
                        }
                    }, (length - 1) * 950);
                }
            }, 950);
        }

        function fanpai(pai) {

            
            var _this = pai;
            _this.flip({
                direction: 'lr',
                content: '',
                speed: 200,
                onEnd: function () {
                    _this.addClass('open');
                }
            });
        }

        function showHeadImg(go_out_room_id, go_out_member_id) {

            $("#go_out_room_id").attr('data', go_out_room_id);
            $("#go_out_member_id").attr('data', go_out_member_id);
            $('.alert').show();
        }

        function hideView() {
            $('.alert').hide();
        }

        function go_out_one() {

            var go_out_room_id = $("#go_out_room_id").attr('data');
            var go_out_member_id = $("#go_out_member_id").attr('data');

            $('.alert').hide();

            //console.log(go_out_room_id);
            //console.log(go_out_member_id);

            $.get("/game.php/douniuplay/go_out/room_id/" + go_out_room_id + "/member_id/" + go_out_member_id + ".html",
                function (data, status) {
                    $(".member__" + $("#go_out_member_id").attr('data')).hide();
                    //console.log("Data: " + data + "\nStatus: " + status);
                });

        }
    </script>
    <!-- <audio onended="mp3playandpause('mp3niu0');" id="mp3niu0" src="__STATIC__/game/video/nv_niu0.mp3"></audio>
<audio onended="mp3playandpause('mp3niu1');" id="mp3niu1" src="__STATIC__/game/video/nv_niu1.mp3"></audio>
<audio onended="mp3playandpause('mp3niu2');" id="mp3niu2" src="__STATIC__/game/video/nv_niu2.mp3"></audio>
<audio onended="mp3playandpause('mp3niu3');" id="mp3niu3" src="__STATIC__/game/video/nv_niu3.mp3"></audio>
<audio onended="mp3playandpause('mp3niu4');" id="mp3niu4" src="__STATIC__/game/video/nv_niu4.mp3"></audio>
<audio onended="mp3playandpause('mp3niu5');" id="mp3niu5" src="__STATIC__/game/video/nv_niu5.mp3"></audio>
<audio onended="mp3playandpause('mp3niu6');" id="mp3niu6" src="__STATIC__/game/video/nv_niu6.mp3"></audio>
<audio onended="mp3playandpause('mp3niu7');" id="mp3niu7" src="__STATIC__/game/video/nv_niu7.mp3"></audio>
<audio onended="mp3playandpause('mp3niu8');" id="mp3niu8" src="__STATIC__/game/video/nv_niu8.mp3"></audio>
<audio onended="mp3playandpause('mp3niu9');" id="mp3niu9" src="__STATIC__/game/video/nv_niu9.mp3"></audio>
<audio onended="mp3playandpause('mp3niu10');" id="mp3niu10" src="__STATIC__/game/video/nv_niuniu.mp3"></audio>
<audio onended="mp3playandpause('mp3niu11');" id="mp3niu11" src="__STATIC__/game/video/nv_wuhua.mp3"></audio>
<audio onended="mp3playandpause('mp3niu12');" id="mp3niu12" src="__STATIC__/game/video/nv_zha.mp3"></audio>
<audio onended="mp3playandpause('mp3niu13');" id="mp3niu13" src="__STATIC__/game/video/nv_wuxiao.mp3"></audio>

<audio onended="mp3playandpause('mp3daojishi');" id="mp3daojishi" src="__STATIC__/game/video/daojishi.mp3"></audio>
<audio onended="mp3playandpause('mp3gold');" id="mp3gold" src="__STATIC__/game/video/gold.mp3"></audio>
<audio onended="mp3playandpause('mp3kaiju');" id="mp3kaiju" src="__STATIC__/game/video/kaiju.mp3"></audio>
<audio onended="mp3playandpause('mp3xiazhu');" id="mp3xiazhu" src="__STATIC__/game/video/xiazhu.mp3"></audio>
<audio onended="mp3playandpause('mp3fapai');" id="mp3fapai" src="__STATIC__/game/video/fapai.mp3"></audio>

<audio onended="mp3playandpause('message1');" id="message1" src="__STATIC__/game/message/message1.m4a"></audio>
<audio onended="mp3playandpause('message2');" id="message2" src="__STATIC__/game/message/message2.m4a"></audio>
<audio onended="mp3playandpause('message3');" id="message3" src="__STATIC__/game/message/message3.m4a"></audio>
<audio onended="mp3playandpause('message4');" id="message4" src="__STATIC__/game/message/message4.m4a"></audio>
<audio onended="mp3playandpause('message5');" id="message5" src="__STATIC__/game/message/message5.m4a"></audio>
<audio onended="mp3playandpause('message6');" id="message6" src="__STATIC__/game/message/message6.m4a"></audio>
<audio onended="mp3playandpause('message7');" id="message7" src="__STATIC__/game/message/message7.m4a"></audio>
<audio onended="mp3playandpause('message8');" id="message8" src="__STATIC__/game/message/message8.m4a"></audio>
<audio onended="mp3playandpause('message9');" id="message9" src="__STATIC__/game/message/message9.m4a"></audio>
<audio onended="mp3playandpause('message10');" id="message10" src="__STATIC__/game/message/message10.m4a"></audio>
<audio onended="mp3playandpause('message11');" id="message11" src="__STATIC__/game/message/message11.m4a"></audio>
<audio onended="mp3playandpause('message12');" id="message12" src="__STATIC__/game/message/message12.m4a"></audio>
<audio onended="mp3playandpause('message13');" id="message13" src="__STATIC__/game/message/message13.m4a"></audio>
<audio onended="mp3playandpause('message14');" id="message14" src="__STATIC__/game/message/message14.m4a"></audio>

<audio id="background" autoplay="autoplay" loop="loop" src="__STATIC__/game/video/background.mp3" autoplay preload></audio>

<script>
    function mp3play(id){
        document.getElementById(id).play();
    }
    function mp3pause(id){
        document.getElementById(id).pause();
    }

    function mp3playandpause(id){
        mp3play(id);
        mp3pause(id);
    }

</script>
<script>
    function audioAutoPlay(id){
        var audio = document.getElementById(id),
                play = function(){
                    audio.play();
                };
        document.addEventListener("WeixinJSBridgeReady", function () {
            play();
            mp3pause(id);
        }, false);
        document.addEventListener('YixinJSBridgeReady', function() {
            play();
            mp3pause(id);
        }, false);
    }

    audioAutoPlay('mp3niu0');
    audioAutoPlay('mp3niu1');
    audioAutoPlay('mp3niu2');
    audioAutoPlay('mp3niu3');
    audioAutoPlay('mp3niu4');
    audioAutoPlay('mp3niu5');
    audioAutoPlay('mp3niu6');
    audioAutoPlay('mp3niu7');
    audioAutoPlay('mp3niu8');
    audioAutoPlay('mp3niu9');
    audioAutoPlay('mp3niu10');
    audioAutoPlay('mp3niu11');
    audioAutoPlay('mp3niu12');
    audioAutoPlay('mp3niu13');
    audioAutoPlay('background');

    audioAutoPlay('mp3daojishi');
    audioAutoPlay('mp3gold');
    audioAutoPlay('mp3kaiju');
    audioAutoPlay('mp3xiazhu');

    audioAutoPlay('mp3fapai');



    audioAutoPlay('message1');
    audioAutoPlay('message2');
    audioAutoPlay('message3');
    audioAutoPlay('message4');
    audioAutoPlay('message5');
    audioAutoPlay('message6');
    audioAutoPlay('message7');
    audioAutoPlay('message8');
    audioAutoPlay('message9');
    audioAutoPlay('message10');
    audioAutoPlay('message11');
    audioAutoPlay('message12');



setTimeout(function(){
    mp3play('background');
},2000)



</script>

 -->

 <audio onended="mp3playandpause('mp3niu0');" id="mp3niu0" src="__STATIC__/game/video/nv_niu0.mp3"></audio>
<audio onended="mp3playandpause('mp3niu1');" id="mp3niu1" src="__STATIC__/game/video/nv_niu1.mp3"></audio>
<audio onended="mp3playandpause('mp3niu2');" id="mp3niu2" src="__STATIC__/game/video/nv_niu2.mp3"></audio>
<audio onended="mp3playandpause('mp3niu3');" id="mp3niu3" src="__STATIC__/game/video/nv_niu3.mp3"></audio>
<audio onended="mp3playandpause('mp3niu4');" id="mp3niu4" src="__STATIC__/game/video/nv_niu4.mp3"></audio>
<audio onended="mp3playandpause('mp3niu5');" id="mp3niu5" src="__STATIC__/game/video/nv_niu5.mp3"></audio>
<audio onended="mp3playandpause('mp3niu6');" id="mp3niu6" src="__STATIC__/game/video/nv_niu6.mp3"></audio>
<audio onended="mp3playandpause('mp3niu7');" id="mp3niu7" src="__STATIC__/game/video/nv_niu7.mp3"></audio>
<audio onended="mp3playandpause('mp3niu8');" id="mp3niu8" src="__STATIC__/game/video/nv_niu8.mp3"></audio>
<audio onended="mp3playandpause('mp3niu9');" id="mp3niu9" src="__STATIC__/game/video/nv_niu9.mp3"></audio>
<audio onended="mp3playandpause('mp3niu10');" id="mp3niu10" src="__STATIC__/game/video/nv_niuniu.mp3"></audio>
<audio onended="mp3playandpause('mp3niu11');" id="mp3niu11" src="__STATIC__/game/video/nv_wuhua.mp3"></audio>
<audio onended="mp3playandpause('mp3niu12');" id="mp3niu12" src="__STATIC__/game/video/nv_zha.mp3"></audio>
<audio onended="mp3playandpause('mp3niu13');" id="mp3niu13" src="__STATIC__/game/video/nv_wuxiao.mp3"></audio>

<audio onended="mp3playandpause('mp3daojishi');" id="mp3daojishi" src="__STATIC__/game/video/daojishi.mp3"></audio>
<audio onended="mp3playandpause('mp3gold');" id="mp3gold" src="__STATIC__/game/video/gold.mp3"></audio>
<audio onended="mp3playandpause('mp3kaiju');" id="mp3kaiju" src="__STATIC__/game/video/kaiju.mp3"></audio>
<audio onended="mp3playandpause('mp3xiazhu');" id="mp3xiazhu" src="__STATIC__/game/video/xiazhu.mp3"></audio>
<audio onended="mp3playandpause('mp3fapai');" id="mp3fapai" src="__STATIC__/game/video/fapai.mp3"></audio>

<audio onended="mp3playandpause('message1');" id="message1" src="__STATIC__/game/message/message1.m4a"></audio>
<audio onended="mp3playandpause('message2');" id="message2" src="__STATIC__/game/message/message2.m4a"></audio>
<audio onended="mp3playandpause('message3');" id="message3" src="__STATIC__/game/message/message3.m4a"></audio>
<audio onended="mp3playandpause('message4');" id="message4" src="__STATIC__/game/message/message4.m4a"></audio>
<audio onended="mp3playandpause('message5');" id="message5" src="__STATIC__/game/message/message5.m4a"></audio>
<audio onended="mp3playandpause('message6');" id="message6" src="__STATIC__/game/message/message6.m4a"></audio>
<audio onended="mp3playandpause('message7');" id="message7" src="__STATIC__/game/message/message7.m4a"></audio>
<audio onended="mp3playandpause('message8');" id="message8" src="__STATIC__/game/message/message8.m4a"></audio>
<audio onended="mp3playandpause('message9');" id="message9" src="__STATIC__/game/message/message9.m4a"></audio>
<audio onended="mp3playandpause('message10');" id="message10" src="__STATIC__/game/message/message10.m4a"></audio>
<audio onended="mp3playandpause('message11');" id="message11" src="__STATIC__/game/message/message11.m4a"></audio>
<audio onended="mp3playandpause('message12');" id="message12" src="__STATIC__/game/message/message12.m4a"></audio>
<audio onended="mp3playandpause('message13');" id="message13" src="__STATIC__/game/message/message13.m4a"></audio>
<audio onended="mp3playandpause('message14');" id="message14" src="__STATIC__/game/message/message14.m4a"></audio>
<audio onended="mp3playandpause('message20');" id="message20" src="__STATIC__/game/message/message20.m4a"></audio>
<audio onended="mp3playandpause('message21');" id="message21" src="__STATIC__/game/message/message21.m4a"></audio>

<audio onended="mp3playandpause('nobanker');" id="nobanker" src="__STATIC__/game/message/nobanker.m4a"></audio>
<audio onended="mp3playandpause('robbanker');" id="robbanker" src="__STATIC__/game/message/robbanker.m4a"></audio>
<audio onended="mp3playandpause('times1');" id="times1" src="__STATIC__/game/message/times1.m4a"></audio>
<audio onended="mp3playandpause('times2');" id="times2" src="__STATIC__/game/message/times2.m4a"></audio>
<audio onended="mp3playandpause('times3');" id="times3" src="__STATIC__/game/message/times3.m4a"></audio>
<audio onended="mp3playandpause('times4');" id="times4" src="__STATIC__/game/message/times4.m4a"></audio>
<audio onended="mp3playandpause('times5');" id="times5" src="__STATIC__/game/message/times5.m4a"></audio>
<audio onended="mp3playandpause('times8');" id="times8" src="__STATIC__/game/message/times8.m4a"></audio>
<audio onended="mp3playandpause('times10');" id="times10" src="__STATIC__/game/message/times10.m4a"></audio>

<audio id="background" loop="loop" src="__STATIC__/game/video/background.mp3"  preload></audio>

<script>
    function mp3play(id){
        document.getElementById(id).play();
    }
    function mp3pause(id){
        document.getElementById(id).pause();
    }

    function mp3playandpause(id){
        mp3play(id);
        mp3pause(id);
    }

</script>
<script>
    function audioAutoPlay(id){
        var audio = document.getElementById(id),
                play = function(){
                    audio.play();
                };
        document.addEventListener("WeixinJSBridgeReady", function () {
            play();
            mp3pause(id);
        }, false);
        document.addEventListener('YixinJSBridgeReady', function() {
            play();
            mp3pause(id);
        }, false);
    }

    audioAutoPlay('mp3niu0');
    audioAutoPlay('mp3niu1');
    audioAutoPlay('mp3niu2');
    audioAutoPlay('mp3niu3');
    audioAutoPlay('mp3niu4');
    audioAutoPlay('mp3niu5');
    audioAutoPlay('mp3niu6');
    audioAutoPlay('mp3niu7');
    audioAutoPlay('mp3niu8');
    audioAutoPlay('mp3niu9');
    audioAutoPlay('mp3niu10');
    audioAutoPlay('mp3niu11');
    audioAutoPlay('mp3niu12');
    audioAutoPlay('mp3niu13');
    audioAutoPlay('background');

    audioAutoPlay('mp3daojishi');
    audioAutoPlay('mp3gold');
    audioAutoPlay('mp3kaiju');
    audioAutoPlay('mp3xiazhu');

    audioAutoPlay('mp3fapai');



    audioAutoPlay('message1');
    audioAutoPlay('message2');
    audioAutoPlay('message3');
    audioAutoPlay('message4');
    audioAutoPlay('message5');
    audioAutoPlay('message6');
    audioAutoPlay('message7');
    audioAutoPlay('message8');
    audioAutoPlay('message9');
    audioAutoPlay('message10');
    audioAutoPlay('message11');
    audioAutoPlay('message12');
   


setTimeout(function(){
    if (localStorage.getItem('allowPlayBG') != 'false') {
        mp3play('background');
    }
},2000)



</script>

 <div style="display: none;"> <img src="__STATIC__/game/img/pai/1.png">
<img src="__STATIC__/game/img/pai/2.png">
<img src="__STATIC__/game/img/pai/3.png">
<img src="__STATIC__/game/img/pai/4.png">
<img src="__STATIC__/game/img/pai/5.png">
<img src="__STATIC__/game/img/pai/6.png">
<img src="__STATIC__/game/img/pai/7.png">
<img src="__STATIC__/game/img/pai/8.png">
<img src="__STATIC__/game/img/pai/9.png">
<img src="__STATIC__/game/img/pai/10.png">
<img src="__STATIC__/game/img/pai/11.png">
<img src="__STATIC__/game/img/pai/12.png">
<img src="__STATIC__/game/img/pai/13.png">
<img src="__STATIC__/game/img/pai/14.png">
<img src="__STATIC__/game/img/pai/15.png">
<img src="__STATIC__/game/img/pai/16.png">
<img src="__STATIC__/game/img/pai/17.png">
<img src="__STATIC__/game/img/pai/18.png">
<img src="__STATIC__/game/img/pai/19.png">
<img src="__STATIC__/game/img/pai/20.png">
<img src="__STATIC__/game/img/pai/21.png">
<img src="__STATIC__/game/img/pai/22.png">
<img src="__STATIC__/game/img/pai/23.png">
<img src="__STATIC__/game/img/pai/24.png">
<img src="__STATIC__/game/img/pai/25.png">
<img src="__STATIC__/game/img/pai/26.png">
<img src="__STATIC__/game/img/pai/27.png">
<img src="__STATIC__/game/img/pai/28.png">
<img src="__STATIC__/game/img/pai/29.png">
<img src="__STATIC__/game/img/pai/30.png">
<img src="__STATIC__/game/img/pai/31.png">
<img src="__STATIC__/game/img/pai/32.png">
<img src="__STATIC__/game/img/pai/33.png">
<img src="__STATIC__/game/img/pai/34.png">
<img src="__STATIC__/game/img/pai/35.png">
<img src="__STATIC__/game/img/pai/36.png">
<img src="__STATIC__/game/img/pai/37.png">
<img src="__STATIC__/game/img/pai/38.png">
<img src="__STATIC__/game/img/pai/39.png">
<img src="__STATIC__/game/img/pai/40.png">
<img src="__STATIC__/game/img/pai/41.png">
<img src="__STATIC__/game/img/pai/42.png">
<img src="__STATIC__/game/img/pai/43.png">
<img src="__STATIC__/game/img/pai/44.png">
<img src="__STATIC__/game/img/pai/45.png">
<img src="__STATIC__/game/img/pai/46.png">
<img src="__STATIC__/game/img/pai/47.png">
<img src="__STATIC__/game/img/pai/48.png">
<img src="__STATIC__/game/img/pai/49.png">
<img src="__STATIC__/game/img/pai/50.png">
<img src="__STATIC__/game/img/pai/51.png">
<img src="__STATIC__/game/img/pai/52.png">

<img src="__STATIC__/game/img/niu0.png">
<img src="__STATIC__/game/img/niu1.png">
<img src="__STATIC__/game/img/niu2.png">
<img src="__STATIC__/game/img/niu3.png">
<img src="__STATIC__/game/img/niu4.png">
<img src="__STATIC__/game/img/niu5.png">
<img src="__STATIC__/game/img/niu6.png">
<img src="__STATIC__/game/img/niu7.png">
<img src="__STATIC__/game/img/niu8.png">
<img src="__STATIC__/game/img/niu9.png">
<img src="__STATIC__/game/img/niu10.png">
<img src="__STATIC__/game/img/niu11.png">
<img src="__STATIC__/game/img/niu12.png">
<img src="__STATIC__/game/img/niu13.png"></div>
</body>

</html>